package com.nbicc.news.vo;

import com.nbicc.attachments.po.Attachment;
import com.nbicc.news.po.NewsContent;
import com.nbicc.news.po.NewsInfo;
import com.nbicc.newscat.po.NewsCat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@ApiModel(value="新闻整体对象")
@Data
public class News implements ExtInfoAble{

    /**
     *
     */
    public final static String FILED_NEWS_ATTACHMENTS = "newsAttachments";

    @ApiModelProperty(value="新闻描述")
    private NewsInfo newsInfo;
    @ApiModelProperty(value="新闻内容")
    private NewsContent newsContent;
    @ApiModelProperty(value="新闻目录关系")
    private List<NewsCat> newsCats;
    @ApiModelProperty(value="新闻附件")
    private List<Attachment> newsAttachments;

    @ApiModelProperty(value="新闻额外信息" ,
            notes = "visitCount:访问次数(只记录匿名接口流量)",
            example = "visitCount：5")
    private Map<String , Object> extInfo = new HashMap<>();

}
